package orion.cricScoreCard.Entities;

import java.util.ArrayList;
import java.util.List;

public class Teams {
	public  List<String> _battingTeam;
	public  List<String> _bowlingTeam;
	public  int teamRuns;

	public Teams() {
		_battingTeam = new ArrayList<String>();
		_bowlingTeam = new ArrayList<String>();
	}

	public  void addPlayer(String player, String type) {
		if (type.equals("Bowler")) {
			_bowlingTeam.add(player);
		} else {
			_battingTeam.add(player);
		}
	}

	public  void removePlayer(String player, String type) {
		if (type.equals("Bowler")) {
			_bowlingTeam.remove(player);
		} else {
			_battingTeam.remove(player);
		}
	}

	public  List<String> getBattingTeam() {
		return _battingTeam;
	}

	public  List<String> getBowlingTeam() {
		return _bowlingTeam;
	}

	public  int teamRuns() {
		return teamRuns;
	}
}
